﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:local="clr-namespace:Nok_Air"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="Nok_Air.Confirm"
	Foreground="{StaticResource PhoneForegroundBrush}" 
	Orientation="Portrait" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display" FontSize="40">

    <phone:PhoneApplicationPage.Resources>
        <local:DepartuerOrReturnFlightSegment x:Key="DepartuerOrReturnFlightSegment"/>
        <local:DayConverter3 x:Key="DayConverter3" />
        <local:AirportCodeToNameConverter x:Key="codeconverter"/>
        <DataTemplate x:Key="FlightSegmentTemplate">
            <StackPanel VerticalAlignment="Center" Width="460" Margin="0,0,0,15">
                <StackPanel>
                    <StackPanel.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="White" Offset="0.262"/>
                                    <GradientStop Color="#00FEE481" Offset="1"/>
                                </LinearGradientBrush>
                    </StackPanel.Background>
                    <TextBlock Margin="10,0,0,0" HorizontalAlignment="Left" Text="{Binding Converter={StaticResource DepartuerOrReturnFlightSegment}}" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display" FontSize="45" Foreground="Black"/>
                </StackPanel>
                <StackPanel>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="1*"/>
                            <ColumnDefinition Width="60"/>
                            <ColumnDefinition Width="2.5*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock TextWrapping="Wrap" Text="{Binding From}" Foreground="Black" Margin="0,0,10,0"/>
                        <TextBlock Grid.Column="1" Foreground="#99000000" Text="{Binding DepartureAirport}"  d:LayoutOverrides="Width" HorizontalAlignment="Center"/>
                        <TextBlock Grid.Column="2" Foreground="Black" Text="{Binding DepartureAirport, Converter={StaticResource codeconverter}}"/>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="1*"/>
                            <ColumnDefinition Width="60"/>
                            <ColumnDefinition Width="2.5*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock TextWrapping="Wrap" Text="{Binding To}" Foreground="Black" Margin="0,0,10,0"/>
                        <TextBlock Grid.Column="1" Foreground="#99000000" Text="{Binding ArrivalAirport}" d:LayoutOverrides="Width" HorizontalAlignment="Center"/>
                        <TextBlock Grid.Column="2" Foreground="Black" Text="{Binding ArrivalAirport, Converter={StaticResource codeconverter}}"/>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition  Width="1*"/>
                            <ColumnDefinition  Width="2.8*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Date}" Foreground="Black" VerticalAlignment="Center"/>
                        <TextBlock Margin="0" TextWrapping="NoWrap" Text="{Binding BoardDate, Converter={StaticResource DayConverter3}}" Foreground="#FF090101" HorizontalAlignment="Left" Grid.Column="1"/>
                    </Grid>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition  Width="*"/>
                            <ColumnDefinition  Width="1.3*"/>
                        </Grid.ColumnDefinitions>
                        <Grid Grid.Column="0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition  Width="1*"/>
                                <ColumnDefinition  Width="2*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Time}" Foreground="Black" VerticalAlignment="Center"/>
                            <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="{Binding DepartureTime}" Foreground="Black" Grid.Column="1"/>
                        </Grid>
                        <Grid Grid.Column="1">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition  Width="1*"/>
                                <ColumnDefinition  Width="2*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Flight}" Foreground="Black" VerticalAlignment="Center"/>
                            <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="{Binding FlightNumber}" Foreground="Black" Grid.Column="1"/>
                        </Grid>
                    </Grid>
                </StackPanel>
            </StackPanel>
        </DataTemplate>
    </phone:PhoneApplicationPage.Resources>
	<Grid x:Name="LayoutRoot" Background="Transparent" d:DataContext="{d:DesignData /SampleData/MainViewModelSampleData.xaml}">
        <Grid.RowDefinitions>
			<RowDefinition Height="70"/>
			<RowDefinition Height="*"/>
			<RowDefinition Height="80"/>
		</Grid.RowDefinitions>
		<Grid Style="{StaticResource TopAppBarStyle}">
			<Grid.ColumnDefinitions>
				<ColumnDefinition  Width="1*"/> 		
				<ColumnDefinition  Width="2*"/> 		
				<ColumnDefinition  Width="1*"/> 		
			</Grid.ColumnDefinitions> 
			<Button x:Name="backButton" Content="Back" HorizontalAlignment="Left"  Width="130" Margin="15,0,0,0" Height="60" Style="{StaticResource BackButtonStyle}" Foreground="White" Visibility="Collapsed" />
			<TextBlock x:Name="Title_checkIn_TextBlock" Margin="0" TextWrapping="Wrap" Text="{Binding ConfirmTitle}" FontSize="48" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Grid.Column="1" Visibility="Visible"/>
			<Button x:Name="continueButton" Content="Continue" Width="130" Style="{StaticResource BlueButtonStyle}" Height="60" Margin="0" Foreground="White" Click="Button_Click" HorizontalAlignment="Center" Grid.Column="2" VerticalAlignment="Center" FontSize="40" Visibility="Collapsed" />
		</Grid>
		<Grid Style="{StaticResource ContentStyle}" Margin="0">
			<Grid Margin="10">
				<StackPanel Height="624" VerticalAlignment="Top">
                    <ScrollViewer Height="555" HorizontalScrollBarVisibility="Disabled">
                        <StackPanel x:Name="ReportPanel">
                            <ListBox x:Name="FlightSegmentListBox" ItemsSource="{Binding FlightSegmentItems}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ItemTemplate="{StaticResource FlightSegmentTemplate}">
                            </ListBox>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="2*"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock TextWrapping="Wrap" Text="{Binding TotalAmount}" Foreground="Black" VerticalAlignment="Center" HorizontalAlignment="Left"/>
                                <StackPanel Grid.Column="1" Orientation="Horizontal">
                                    <TextBlock TextWrapping="Wrap" Text="{Binding PricingV2Items.TotalAmount}" Foreground="Red"  VerticalAlignment="Center" HorizontalAlignment="Left"/>
                                    <TextBlock TextWrapping="Wrap" Text="{Binding MoneyUnit}" Foreground="Red"  VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"/>
                                </StackPanel>
                            </Grid>
                        </StackPanel>
                    </ScrollViewer>
                    <StackPanel Margin="0,5,0,0" Orientation="Vertical">
                        <Button Content="Confirm" Margin="0" VerticalAlignment="Center" FontSize="40" Style="{StaticResource BlueButtonStyle}" Background="Black" Click="Button_Click" HorizontalAlignment="Center" Width="150" Height="65" />
                    </StackPanel>
                </StackPanel>
					
        	
			</Grid>
		</Grid>
		
		<Grid Grid.Row="2">
			<local:AppBarMenuUserControl/>
		</Grid>
		
		<!--TitlePanel contains the name of the application and page title-->

		<!--ContentPanel - place additional content here-->
	</Grid>
</phone:PhoneApplicationPage>